<template>
	<view class="page">
		<view class="status-bar"></view>
		<view class="top">
			<!-- #ifdef MP -->
			<!-- 页面标题 -->
			<view class="page-title" :style="'height: ' + navBarHeight"><image  mode="heightFix" src="../../static/logo.png"></image></view>
			<!-- 搜索 -->
			<view class="search" :style="showNavFloat ? 'display:none' : ''">
				<navigator class="input" :url="'/pages/search?model=article&category_id=' + category_id" hover-class="none">
					<iconfont type="search"></iconfont>
					<text>{{keyword}}</text>
				</navigator>
			</view>
			<!-- #endif -->

			<!-- 搜索 -->
			<!-- #ifdef H5 -->
			<view class="search" >
				<image class="logo"  style="height:auto;width:100px;" mode="widthFix" src="../../static/logo.png"></image>
				<navigator class="input" url="/pages/search?model=article" hover-class="none" >
					<iconfont type="search"></iconfont>
					<text style="">{{keyword}}</text>
				</navigator>
				<navigator class="user"  @tap="goTab('/pages/profile/profile')" url="/pages/profile/profile" hover-class="none">
					<iconfont type="user-01"></iconfont>
					<!-- <image v-if="current.user" :src="user.avatar_url"></image> -->
					<!-- <image src="/static/images/default_user_photo.jpg" @tap="login()"></image> -->
				</navigator>
			</view>
			<!-- #endif -->

			<!-- 导航 -->
			<view class="navbar" :class="showNavFloat ? 'floatbar' : ''">
				<view class="menu" v-if="category.length > 0">
					<view class="category">
						<scroll-view :scroll-x="true" :scroll-with-animation="true" :scroll-into-view="scroll_category_id" @scroll="navFloatShow()">
							<view
								class="item"
								v-for="(item, index) in category"
								:key="index"
								:class="category_id == item.url ? 'current' : ''"
								:id="'category_id-' + index"
								:style="'width:' + (category.length <= 4 ? 100 / category.length + '%' : '')"
								@tap="categoryChange(item.url, index)"
							>
								<view class="text">
									<text>{{ item.name }}</text>
									<!-- <image src="/static/images/bg_tab.png"></image> -->
								</view>
							</view>
						</scroll-view>
					</view>
					<view class="list" @tap="menuShow(!showMenu)"><iconfont type="menu-01"></iconfont></view>
				</view>
			</view>
		</view>
		<view class="content">
			<view class="menu-block fade-in" v-show="showMenu">
				<view class="list">
					<text
						class="item"
						v-for="(item, index) in category"
						:key="index"
						:class="category_id == item.url ? 'current' : ''"
						:id="'category_id-' + (index + 1)"
						@tap="categoryChange(item.url, index)"
					>
						{{ item.name }}
					</text>
				</view>
			</view>



		<scroller @init="initScroller" @down="refreshData" @up="getData" :up="optUp" @scroll="navFloatShow(scroller)" :fixed="false">
	 	<swiper v-if="banners.length > 0" class="swiper" :indicator-dots="true" :autoplay="true" :circular="true">
					<swiper-item v-for="(item, index) in banners" :key="index">
						<navigator class="item" hover-class="none" :url="'/pages/article/detail?id=' + item.jump_link">
							<image :lazy-load="true" :src="item.cover" mode="aspectFill"></image>
							<view class="title">
								<text>{{ item.title }}</text>
							</view>
						</navigator>
					</swiper-item>
				</swiper>
				<article_list :list="articles" />
			</scroller>
		</view>
		<pageLoading v-if="showPageLoading"></pageLoading>
	</view>
</template>

<script>
import scroller from '@/components/scroller/scroller.vue';
import article_list from '@/components/article/list.vue';
import pageLoading from '@/components/loading/pageLoading.vue';
import iconfont from '@/components/iconfont/iconfont.vue';
import util from '@/common/util.js';
import {adList,articleCate, articleList} from '@/api/article';

export default {
	components: {
		article_list,
		pageLoading,
		scroller,
		iconfont
	},
	data() {
		return {
			keyword:'',
			scroller: {},
			optUp: { auto: true, onScroll: true, page: { size: 10 }, empty: { tip: '暂无文章~' } },
			category_id: 0,
			category_index: 0,
			scroll_category_id: 'scroll_category_id_0',
			currentSliderIndex: 0,
			category: [],
			showMenu: false,
			banners: [],
			articles: [],
			showNoData: false,
			showPageLoading: true,
			showNavFloat: false,
			navBarHeight: '',
			loadingType: 'more',
			page:0,
			userInfo: {},
			loading: true
		};
	},
	filters: {
		time(val) {
			return moment(val * 1000).format('YYYY-MM-DD HH:mm:ss');
		},
		numFilter(val) {
			return val >= 0 ? `+${val.toString()}` : val;
		}
	},
	onShareAppMessage() {
		return {
			path: '/pages/article/index',
			success: function(e) {},
			title: '未来迹'
		};
	},
	onShareTimeline() {
			return {
				title: '未来迹',
				path:  '/pages/article/index',
				imageUrl: 'https://fbeauty.cn/attachment/images/logo.png'
			};
	},
	onLoad(e) {
		this.$initPageTitle(); //初始化页面标题
		/*导航栏高度*/
		if (this.navBarHeight == '') {
			this.navBarHeight = this.$app.getNaviBarHeight();
		}
		// let keyword = uni.getStorageSync('article-search');
		// console.log("keyword",keyword)
		// this.loadData();
		// this.scroller.resetUpScroll();
		// this.scroller.resetUpScroll();
		/*来源是登录时更新*/
		// let source = uni.getStorageSync('source');
		// if (source == 'login') {
		// 	uni.removeStorageSync('source');
		// 	this.loadData();
		// }
		// #ifdef H5
		if (e.category_id > 0) {
			this.category_id = e.category_id;
		}
		if (e.category_index > 0) {
			this.category_index = e.category_index;
		}
		// #endif
		this.getCategory();


		this.$http
				.get(`${adList}`, {})
				.then(r => {
					this.loading = false;
					this.loadingType = r.data.length === 10 ? 'more' : 'nomore';
					this.banners = [...this.banners, ...r.data];
					console.log(this.banners)
				})
				.catch(() => {
					this.loading = false;
				});

	},
	onShow(){
	   this.getData();
	},
	onPullDownRefresh() {
		uni.showLoading({
			title: '刷新中'
		});
		this.loadData();
	},
	// 加载更多
	onReachBottom() {
    if (this.loadingType === 'nomore') return;
		this.getData();
	},
	methods: {
		// 统一跳转接口,拦截未登录路由
		navTo(route) {
			if (!route) return;
			console.log(route)
			// if (route === '/pages/index/notice/notice') {
			// 	this.$mRouter.push({ route });
			// } else if (!this.hasLogin) {
			// 	uni.removeStorageSync('backToPage');
			// 	this.$mRouter.push({ route: '/pages/public/logintype' });
			// } else {
				this.$mRouter.push({ route });
			// }
		},
		goTab(route) {
			if (!route) return;
				this.$mRouter.switchTab({ route });

		},



		/*初始化滚动*/
		initScroller(scroller) {
			this.scroller = scroller;
		},

		/*刷新数据*/
		refreshData() {
						console.log("refreshData");
			uni.showLoading({
				title: '刷新中'
			});


			this.scroller.resetUpScroll();
		},

		/*加载数据*/
		loadData() {
			this.slider = [];
			this.list = [];
			this.currentSliderIndex = 0;
			this.page=0;
			if(typeof(this.scroller.resetUpScroll)=='function'){


			this.scroller.resetUpScroll();
				}
		},

		/*获取子类别数据*/
		getCategory() {

			const params = {};
			params.id = this.id;
			 this.$http
				.get(`${articleCate}`, params)
				.then( res => {
									if (res.code == 200) {
									   this.category = res.data;
									}
				})
				.catch(() => {
				});
		},

		/*获取数据*/
		getData() {

			this.keyword = uni.getStorageSync('article_keyword');
			console.log("keyword",this.keyword)

			this.page++;
			this.$http
			.get(`${articleList}`, {	category_id: this.category_id,keyword:this.keyword,page: this.page})
			.then(r => {
					this.loading = false;
					this.loadingType = r.data.length === 10 ? 'more' : 'nomore';
					this.articles = [...this.articles, ...r.data];

					this.showPageLoading = false;
			// this.scroller.endByPage(20,90);
				// this.scroller.endByPage(res.articles.length, res.data.page);
				// 	this.showPageLoading = false;
				// } else {

					if(this.loadingType=='more'){

							this.scroller.endSuccess(res.data.length,true);
					}else{
		        	// this.scroller.endSuccess();

							this.scroller.showNoMore();
					}


			})
			.catch((e) => {
				this.showPageLoading = false;
				this.loading = false;
				this.scroller.endSuccess();
				// this.$alert(e.message);
			});
		},

		/*切换导航*/
		categoryChange(category_id, index) {
			this.showMenu = false;
			this.category_index = index;
			this.category_id = category_id;
			var nextIndex = index - 1;
			nextIndex = nextIndex <= 0 ? 0 : nextIndex;
			this.scroll_category_id = `category_id-${nextIndex}`; //动画滚动,滚动至中心位置
			this.loadData();

			// #ifdef H5
			// uni.navigateTo({
			// 	url: '/pages/article/list?category_id=' + this.category_id + '&category_index=' + this.category_index
			// });
			// #endif
		},

		/*广告切换*/
		sliderChange: function(e) {
			this.currentSliderIndex = e.detail.current;
		},

		/*滚动时导航栏浮动*/
		navFloatShow(scroller) {
			if (scroller) {
				if (scroller.scrollTop > 60) {
					if (!this.showNavFloat) {
						this.showNavFloat = true;
					}
				} else {
					if (this.showNavFloat) {
						this.showNavFloat = false;
					}
				}
			}
		},
		/*菜单框展示*/
		menuShow(value) {
			this.showMenu = value;
		},
		/*隐藏导航浮动*/
		navFloatHide() {
			this.showNavFloat = false;
		}
	}
};
</script>

<style scoped lang="scss">
page {
	height: 100%;
}
.page {
	display: flex;
	flex: 1;
	flex-direction: column;
	overflow: hidden;
	height: 100%;
}
.content {
	flex: 1;
	width: 100%;
	height: 100rpx;
}

/*头部*/
.top {
	/*页面标题*/
	.page-title {
		display: flex;
		justify-content: center;
		align-items: center;
		height: 90rpx;
		text-align: center;
		border-bottom: 1rpx solid #efefef;
		z-index: 9999;
		line-height: 1;
		image {
			height: 50rpx;
			width: 280rpx;
			margin-left: -35rpx;
		}
	}

	/*搜索*/
	.search {
		padding: 24rpx 24rpx 0 24rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		.logo {
			height: 60rpx;
			width: 474rpx;
			margin-right: 30rpx;
		}
		.input {
			margin-left: 0 !important;
			display: flex;
			align-items: center;
			height: 70rpx;
			width: 100%;
			background: #f5f5f5;
			border-radius: 34rpx 34rpx 0 34rpx;
			::v-deep .icon {
				margin-left: 28rpx;
				color: #aaaaaa;
				font-size: 32rpx;
				line-height: 1;
			}
			text {
				margin-left: 14rpx;
				font-size: 30rpx;
				color: #aaaaaa;
				line-height: 1;
			}
		}
		.user{
			display: flex;
			align-items: center;
			::v-deep .icon {
				margin-left: 24rpx;
				color: #aaaaaa;
				font-size: 38rpx;
				margin-top: 4rpx;
			}
			image{
				width: 50rpx;
				height: 50rpx;
				border-radius: 50%;
				margin-left: 25rpx;
			}
		}
	}

	/* 顶部navbar */
	.navbar {
		/*分类*/
		.menu {
			position: relative;
			height: 80rpx;
			white-space: nowrap;
			padding: 15rpx 0 6rpx;
			z-index: 10;
			display: flex;
			align-items: center;
			justify-content: space-between;
			/*分类*/
			.category {
				width: 650rpx;
				margin-left: 15rpx;
				white-space: nowrap;
				position: relative;
				scroll-view {
					width: auto;
					.item {
						position: relative;
						display: inline-block;
						margin: 0 31rpx 0;
						height: 80rpx;
						text-align: left;
						padding-top: 12rpx;
						//line-height: 80rpx;
						&:first-child {
							margin-left: 10rpx;
						}
						&:after {
							content: '';
							width: 0;
							height: 0;
							position: absolute;
							left: 50%;
							bottom: 0;
							transform: translateX(-50%);
							transition: 0.3s;
						}
						.text {
							position: relative;
							width: auto;
							height: auto;
							line-height: auto;
							display: inline-block;
							text {
								font-size: 36rpx;
								font-weight: bold;
								color: #555;
							}
							image {
								position: absolute;
								top: 16rpx;
								right: -14rpx;
								width: 50rpx;
								height: 50rpx;
								display: none;
							}
						}
					}
					.current {
						&:after {
							width: 50%;
						}
						.text {
							text {
								font-size: 40rpx;
								font-weight: bold;
								color: #262626;
							}
							image {
								display: block;
							}
							border-bottom: 6rpx solid #3869E6;
						}
					}
				}
			}
			.list {
				width: 70rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				//box-shadow: -4rpx 0 0 #e9ebee;
				//box-shadow: -2px 0 0 #262626;
				::v-deep .icon {
					font-size: 36rpx;
					margin-top: -6rpx;
				}
			}
		}
	}
}
.menu-block {
	position: absolute;
	top: 0;
	left: 0;
	background: #fff;
	border-bottom: 1rpx solid #f5f5f5;
	padding: 20rpx 0 50rpx;
	z-index: 100;
	width: 100%;
	//box-shadow: 0 15rpx 10rpx -15rpx #e9ebee;
	.list {
		padding-left: 10rpx;
		text {
			background: #f5f7fa;
			border-radius: 8rpx;
			font-size: 32rpx;
			margin: 12rpx 20rpx;
			display: inline-block;
			height: 72rpx;
			width: 144rpx;
			line-height: 72rpx;
			text-align: center;
		}
		.current {
			color: #fff;
			background: #3869E6;
			//font-size: 32rpx;
		}
	}
}

.scroll {
	height: 100%;
}

/*幻灯片广告 */
.swiper {
	height: 350rpx;
	margin: 14rpx 24rpx 0;
	image {
		height: 350rpx;
		width: 100%;
		border-radius: 15rpx;
		//box-shadow: 0 0 12px #dddee1;
	}
	.current {
		width: 97%;
		height: 350rpx;
		margin: 1.5% 1.5%;
		transition: all 0.2s ease-in 0s;
	}
	.item {
		position: relative;
		.title {
			position: absolute;
			left: 0;
			bottom: 0;
			display: flex;
			justify-content: center;
			width: 100%;
			text {
				margin: 7% 6%;
				display: flex;
				align-items: center;
				//background-image: linear-gradient(to right, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3));
				//background-image: linear-gradient(90deg,rgba(255, 181, 19,.8),rgba(255, 181, 19,.2));
				color: #fff;
				display: -webkit-box;
				text-overflow: ellipsis;
				word-break: break-all;
				-webkit-line-clamp: 2;
				-webkit-box-orient: vertical;
				overflow: hidden;
				font-size: 34rpx;
				padding: 14rpx 20rpx;
				max-width: 610rpx;
				line-height: 1.3;
				border-radius: 5rpx;
			}
		}
	}
}

/*浮动navbar*/
.floatbar {
	//border-bottom: 1rpx solid #e8e8e8;
	box-shadow: 0px 2px 2px -2px #e8e8e8;
	padding-bottom: 12rpx;
}

::v-deep .no-data {
	margin-top: 200rpx;
}



uni-slider {
    margin: 10px 18px;
    padding: 0;
    display: block
}

uni-slider[hidden] {
    display: none
}

uni-slider .uni-slider-wrapper {
    display: -webkit-flex;
    display: -webkit-box;
    display: flex;
    -webkit-align-items: center;
    -webkit-box-align: center;
    align-items: center;
    min-height: 16px
}

uni-slider .uni-slider-tap-area {
    -webkit-flex: 1;
    -webkit-box-flex: 1;
    flex: 1;
    padding: 8px 0
}

uni-slider .uni-slider-handle-wrapper {
    position: relative;
    height: 2px;
    border-radius: 5px;
    background-color: #e9e9e9;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent
}

uni-slider .uni-slider-handle-wrapper,uni-slider .uni-slider-track {
    -webkit-transition: background-color .3s ease;
    transition: background-color .3s ease
}

uni-slider .uni-slider-track {
    height: 100%;
    border-radius: 6px;
    background-color: #007aff
}

uni-slider .uni-slider-handle,uni-slider .uni-slider-thumb {
    position: absolute;
    left: 50%;
    top: 50%;
    cursor: pointer;
    border-radius: 50%;
    -webkit-transition: border-color .3s ease;
    transition: border-color .3s ease
}

uni-slider .uni-slider-handle {
    width: 28px;
    height: 28px;
    margin-top: -14px;
    margin-left: -14px;
    background-color: rgba(0,0,0,0);
    z-index: 3;
    cursor: grab
}

uni-slider .uni-slider-thumb {
    z-index: 2;
    box-shadow: 0 0 4px rgba(0,0,0,.2)
}

uni-slider .uni-slider-step {
    position: absolute;
    width: 100%;
    height: 2px;
    background: rgba(0,0,0,0);
    z-index: 1
}

uni-slider .uni-slider-value {
    width: 3ch;
    color: #888;
    font-size: 14px;
    margin-left: 1em
}

uni-slider .uni-slider-disabled .uni-slider-track {
    background-color: #ccc
}

uni-slider .uni-slider-disabled .uni-slider-thumb {
    background-color: #fff;
    border-color: #ccc
}

uni-swiper-item {
    display: block;
    overflow: hidden;
    will-change: transform;
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: grab
}

uni-swiper-item[hidden] {
    display: none
}

uni-swiper {
    display: block;
    height: 150px
}

uni-swiper[hidden] {
    display: none
}

uni-swiper .uni-swiper-wrapper {
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 100%;
    -webkit-transform: translateZ(0);
    transform: translateZ(0)
}

uni-swiper .uni-swiper-slides {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0
}

uni-swiper .uni-swiper-slide-frame {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    will-change: transform
}

uni-swiper .uni-swiper-dots {
    position: absolute;
    font-size: 0
}

uni-swiper .uni-swiper-dots-horizontal {
    left: 50%;
    bottom: 10px;
    text-align: center;
    white-space: nowrap;
    -webkit-transform: translate(-50%);
    transform: translate(-50%)
}

uni-swiper .uni-swiper-dots-horizontal .uni-swiper-dot {
    margin-right: 8px
}

uni-swiper .uni-swiper-dots-horizontal .uni-swiper-dot:last-child {
    margin-right: 0
}

uni-swiper .uni-swiper-dots-vertical {
    right: 10px;
    top: 50%;
    text-align: right;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%)
}

uni-swiper .uni-swiper-dots-vertical .uni-swiper-dot {
    display: block;
    margin-bottom: 9px
}

uni-swiper .uni-swiper-dots-vertical .uni-swiper-dot:last-child {
    margin-bottom: 0
}

uni-swiper .uni-swiper-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    cursor: pointer;
    -webkit-transition-property: background-color;
    transition-property: background-color;
    -webkit-transition-timing-function: ease;
    transition-timing-function: ease;
    background: rgba(0,0,0,.3);
    border-radius: 50%
}

uni-swiper .uni-swiper-dot-active {
    background-color: #000
}

uni-swiper .uni-swiper-navigation {
    width: 26px;
    height: 26px;
    cursor: pointer;
    position: absolute;
    top: 50%;
    margin-top: -13px;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-transition: all .2s;
    transition: all .2s;
    border-radius: 50%;
    opacity: 1
}

uni-swiper .uni-swiper-navigation-disabled {
    opacity: .35;
    cursor: not-allowed
}

uni-swiper .uni-swiper-navigation-hide {
    opacity: 0;
    cursor: auto;
    pointer-events: none
}

uni-swiper .uni-swiper-navigation-prev {
    left: 10px
}

uni-swiper .uni-swiper-navigation-prev i {
    margin-left: -1px;
    left: 10px
}

uni-swiper .uni-swiper-navigation-prev.uni-swiper-navigation-vertical {
    top: 18px;
    left: 50%;
    margin-left: -13px
}

uni-swiper .uni-swiper-navigation-prev.uni-swiper-navigation-vertical i {
    -webkit-transform: rotate(90deg);
    transform: rotate(90deg);
    margin-left: auto;
    margin-top: -2px
}

uni-swiper .uni-swiper-navigation-next {
    right: 10px
}

uni-swiper .uni-swiper-navigation-next i {
    -webkit-transform: rotate(180deg);
    transform: rotate(180deg)
}

uni-swiper .uni-swiper-navigation-next.uni-swiper-navigation-vertical {
    top: auto;
    bottom: 5px;
    left: 50%;
    margin-left: -13px
}

uni-swiper .uni-swiper-navigation-next.uni-swiper-navigation-vertical i {
    margin-top: 2px;
    -webkit-transform: rotate(270deg);
    transform: rotate(270deg)
}

uni-switch {
    -webkit-tap-highlight-color: transparent;
    display: inline-block;
    cursor: pointer
}

uni-switch[hidden] {
    display: none
}

uni-switch[disabled] {
    cursor: not-allowed
}

uni-switch .uni-switch-wrapper {
    display: -webkit-inline-flex;
    display: -webkit-inline-box;
    display: inline-flex;
    -webkit-align-items: center;
    -webkit-box-align: center;
    align-items: center;
    vertical-align: middle
}

uni-switch .uni-switch-input {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    width: 52px;
    height: 32px;
    margin-right: 5px;
    border: 1px solid #dfdfdf;
    outline: 0;
    border-radius: 16px;
    box-sizing: border-box;
    background-color: #dfdfdf;
    -webkit-transition: background-color .1s,border .1s;
    transition: background-color .1s,border .1s
}

uni-switch[disabled] .uni-switch-input {
    opacity: .7
}

uni-switch .uni-switch-input:before {
    width: 50px;
    background-color: #fdfdfd
}

uni-switch .uni-switch-input:after,uni-switch .uni-switch-input:before {
    content: " ";
    position: absolute;
    top: 0;
    left: 0;
    height: 30px;
    border-radius: 15px;
    transition: -webkit-transform .3s;
    -webkit-transition: -webkit-transform .3s;
    transition: transform .3s;
    transition: transform .3s,-webkit-transform .3s
}

uni-switch .uni-switch-input:after {
    width: 30px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.4)
}

uni-switch .uni-switch-input.uni-switch-input-checked {
    border-color: #007aff;
    background-color: #007aff
}

uni-switch .uni-switch-input.uni-switch-input-checked:before {
    -webkit-transform: scale(0);
    transform: scale(0)
}

uni-switch .uni-switch-input.uni-switch-input-checked:after {
    -webkit-transform: translateX(20px);
    transform: translateX(20px)
}

uni-switch .uni-checkbox-input {
    margin-right: 5px;
    -webkit-appearance: none;
    appearance: none;
    outline: 0;
    border: 1px solid #d1d1d1;
    background-color: #fff;
    border-radius: 3px;
    width: 22px;
    height: 22px;
    position: relative;
    color: #007aff
}

uni-switch:not([disabled]) .uni-checkbox-input:hover {
    border-color: #007aff
}

uni-switch .uni-checkbox-input.uni-checkbox-input-checked:before {
    font: normal normal normal 14px/1 uni;
    content: "\EA08";
    color: inherit;
    font-size: 22px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-48%) scale(.73);
    -webkit-transform: translate(-50%,-48%) scale(.73)
}

uni-switch .uni-checkbox-input.uni-checkbox-input-disabled {
    background-color: #e1e1e1
}

uni-switch .uni-checkbox-input.uni-checkbox-input-disabled:before {
    color: #adadad
}

uni-text[selectable] {
    cursor: auto;
    user-select: text;
    -webkit-user-select: text
}

uni-textarea {
    width: 300px;
    height: 150px;
    display: block;
    position: relative;
    font-size: 16px;
    line-height: normal;
    white-space: pre-wrap;
    word-break: break-all
}

uni-textarea[hidden] {
    display: none
}

.uni-textarea-compute,.uni-textarea-line,.uni-textarea-placeholder,.uni-textarea-textarea,.uni-textarea-wrapper {
    outline: none;
    border: none;
    padding: 0;
    margin: 0;
    text-decoration: inherit
}

.uni-textarea-wrapper {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    min-height: inherit
}

.uni-textarea-compute,.uni-textarea-line,.uni-textarea-placeholder,.uni-textarea-textarea {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    white-space: inherit;
    word-break: inherit
}

.uni-textarea-placeholder {
    color: grey;
    overflow: hidden
}

.uni-textarea-compute,.uni-textarea-line {
    visibility: hidden;
    height: auto
}

.uni-textarea-line {
    width: 1em
}

.uni-textarea-textarea {
    resize: none;
    background: none;
    color: inherit;
    opacity: 1;
    font: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    text-align: inherit;
    text-indent: inherit;
    text-transform: inherit;
    text-shadow: inherit
}

.uni-textarea-textarea-fix-margin {
    width: auto;
    right: 0;
    margin: 0 -3px
}

.uni-textarea-textarea:disabled {
    -webkit-text-fill-color: currentcolor
}

uni-ad {
    display: block;
    overflow: hidden
}

uni-ad[hidden] {
    display: none
}

uni-cover-image {
    display: block;
    line-height: 1.2;
    overflow: hidden;
    pointer-events: auto
}

uni-cover-image,uni-cover-image img {
    height: 100%;
    width: 100%
}

uni-cover-image[hidden] {
    display: none
}
</style>
